<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-07-18 10:38:38
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-07-18 11:20:07
 * @FilePath: \app\src\views\el\table\my-com\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div>
    <p>id:{{ id }}</p>
    <p>name:{{ name }}</p>
    <p>data:{{ data }}</p>
    <el-input v-model="value"></el-input>
  </div>
</template>

<script>
export default {
  model: {
    prop: "checked",
    event: "change",
  },
  props: {
    id: {
      type: String,
      default: "",
    },
    name: {
      type: String,
      default: "",
    },
    data: {
      type: Array,
      default: () => [],
    },
    checked: {
      type: [String, Number],
      default: "",
    },
  },
  computed: {
    value: {
      get() {
        return this.checked;
      },
      set(val) {
        this.$emit("change", val);
      },
    },
  },
};
</script>

<style lang="less" scoped>
</style>